\hypertarget{class_tuple}{\section{Tuple类 参考}
\label{class_tuple}\index{Tuple@{Tuple}}
}


元组  




{\ttfamily \#include $<$Tuple.\+h$>$}

类 Tuple 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_tuple}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_tuple_a07c616afb195cf694e8814318fbd2aa8}{Tuple} ()
\begin{DoxyCompactList}\small\item\em 元组构造函数 \end{DoxyCompactList}\item 
\hyperlink{class_tuple_afa5fadd34cea37a8ce99c1b06fab6b14}{Tuple} (const \hyperlink{class_tuple}{Tuple} \&)
\begin{DoxyCompactList}\small\item\em 元组拷贝构造函数 \end{DoxyCompactList}\item 
virtual \hyperlink{class_tuple_ac25be2d63d4ca6755bcf8e699c413f27}{$\sim$\+Tuple} ()
\begin{DoxyCompactList}\small\item\em 元组析构函数 \end{DoxyCompactList}\item 
bool \hyperlink{class_tuple_a879c785baf54579013f64cc4bfcccde0}{init\+With\+String} (const string \&tuple\+String)
\begin{DoxyCompactList}\small\item\em 从格式化的字符串中初始化元组 \end{DoxyCompactList}\item 
int \hyperlink{class_tuple_af2101a7325c6a4738ad1bc7de5fea20d}{size} ()
\begin{DoxyCompactList}\small\item\em 获取元组大小 \end{DoxyCompactList}\item 
int \hyperlink{class_tuple_ab37a8148901bf4ee55ab9b793f813710}{type} ()
\begin{DoxyCompactList}\small\item\em 获取类型 \end{DoxyCompactList}\item 
void \hyperlink{class_tuple_a2c939fbc7109eb994fcf4a5f05017650}{clear} ()
\begin{DoxyCompactList}\small\item\em 清空元组 \end{DoxyCompactList}\item 
string \hyperlink{class_tuple_a14e6fdcdb7d56cc12ef9347bb0290583}{serialize} ()
\begin{DoxyCompactList}\small\item\em 序列化元组 \end{DoxyCompactList}\item 
\hyperlink{class_tuple_item}{Tuple\+Item} \& \hyperlink{class_tuple_abfc4807b189b92b160d4bc7cb65da983}{operator\mbox{[}$\,$\mbox{]}} (int idx)
\begin{DoxyCompactList}\small\item\em \mbox{[}\mbox{]}运算符重载 \end{DoxyCompactList}\item 
\hyperlink{class_tuple}{Tuple} \& \hyperlink{class_tuple_ac02b2dcd77ff46b40aa584654b9f1757}{operator=} (const \hyperlink{class_tuple}{Tuple} \&)
\begin{DoxyCompactList}\small\item\em 赋值运算符重载 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{友元}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_tuple}{Tuple} \& \hyperlink{class_tuple_aa3ddc8f2d4e5773a63eecdf6ae257b4f}{operator$<$$<$} (\hyperlink{class_tuple}{Tuple} \&, int)
\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,实现给元组添加int型元素 \end{DoxyCompactList}\item 
\hyperlink{class_tuple}{Tuple} \& \hyperlink{class_tuple_ad429aaaed31119892dd975a79b1bd231}{operator$<$$<$} (\hyperlink{class_tuple}{Tuple} \&, double)
\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,实现给元组添加double型元素 \end{DoxyCompactList}\item 
\hyperlink{class_tuple}{Tuple} \& \hyperlink{class_tuple_a532ca9ed8eece8b3d8c4b364dc34fe2a}{operator$<$$<$} (\hyperlink{class_tuple}{Tuple} \&, const char $\ast$)
\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,实现给元组添加char$\ast$型元素 \end{DoxyCompactList}\item 
\hyperlink{class_tuple}{Tuple} \& \hyperlink{class_tuple_a0c80f310eb6838160240a22087f5f77e}{operator$<$$<$} (\hyperlink{class_tuple}{Tuple} \&, \hyperlink{class_tuple_item}{Tuple\+Item} \&)
\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,实现给元组添加元组元素 \end{DoxyCompactList}\item 
ostream \& \hyperlink{class_tuple_a82ca6c23e65415240b396586fbc86160}{operator$<$$<$} (ostream \&, \hyperlink{class_tuple}{Tuple} \&)
\begin{DoxyCompactList}\small\item\em $<$$<$运算符重载,实现输出元组 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
元组 

\subsection{构造及析构函数说明}
\hypertarget{class_tuple_a07c616afb195cf694e8814318fbd2aa8}{\index{Tuple@{Tuple}!Tuple@{Tuple}}
\index{Tuple@{Tuple}!Tuple@{Tuple}}
\subsubsection[{Tuple}]{\setlength{\rightskip}{0pt plus 5cm}Tuple\+::\+Tuple (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_tuple_a07c616afb195cf694e8814318fbd2aa8}


元组构造函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\hypertarget{class_tuple_afa5fadd34cea37a8ce99c1b06fab6b14}{\index{Tuple@{Tuple}!Tuple@{Tuple}}
\index{Tuple@{Tuple}!Tuple@{Tuple}}
\subsubsection[{Tuple}]{\setlength{\rightskip}{0pt plus 5cm}Tuple\+::\+Tuple (
\begin{DoxyParamCaption}
\item[{const {\bf Tuple} \&}]{tuple}
\end{DoxyParamCaption}
)}}\label{class_tuple_afa5fadd34cea37a8ce99c1b06fab6b14}


元组拷贝构造函数 


\begin{DoxyParams}{参数}
{\em tuple} & 元组 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\hypertarget{class_tuple_ac25be2d63d4ca6755bcf8e699c413f27}{\index{Tuple@{Tuple}!````~Tuple@{$\sim$\+Tuple}}
\index{````~Tuple@{$\sim$\+Tuple}!Tuple@{Tuple}}
\subsubsection[{$\sim$\+Tuple}]{\setlength{\rightskip}{0pt plus 5cm}Tuple\+::$\sim$\+Tuple (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_ac25be2d63d4ca6755bcf8e699c413f27}


元组析构函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}


\subsection{成员函数说明}
\hypertarget{class_tuple_a2c939fbc7109eb994fcf4a5f05017650}{\index{Tuple@{Tuple}!clear@{clear}}
\index{clear@{clear}!Tuple@{Tuple}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}void Tuple\+::clear (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_a2c939fbc7109eb994fcf4a5f05017650}


清空元组 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}


实现了 \hyperlink{class_array}{Array}.

\hypertarget{class_tuple_a879c785baf54579013f64cc4bfcccde0}{\index{Tuple@{Tuple}!init\+With\+String@{init\+With\+String}}
\index{init\+With\+String@{init\+With\+String}!Tuple@{Tuple}}
\subsubsection[{init\+With\+String}]{\setlength{\rightskip}{0pt plus 5cm}bool Tuple\+::init\+With\+String (
\begin{DoxyParamCaption}
\item[{const string \&}]{tuple\+String}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_a879c785baf54579013f64cc4bfcccde0}


从格式化的字符串中初始化元组 


\begin{DoxyParams}{参数}
{\em tuple\+String} & 格式化字符串,例如\+:(1,\char`\"{}\+Tom\char`\"{},3.\+1415926) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回true,失败返回false 
\end{DoxyReturn}


实现了 \hyperlink{class_array}{Array}.

\hypertarget{class_tuple_ac02b2dcd77ff46b40aa584654b9f1757}{\index{Tuple@{Tuple}!operator=@{operator=}}
\index{operator=@{operator=}!Tuple@{Tuple}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple} \& Tuple\+::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf Tuple} \&}]{tuple}
\end{DoxyParamCaption}
)}}\label{class_tuple_ac02b2dcd77ff46b40aa584654b9f1757}


赋值运算符重载 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组 
\end{DoxyReturn}
\hypertarget{class_tuple_abfc4807b189b92b160d4bc7cb65da983}{\index{Tuple@{Tuple}!operator\mbox{[}$\,$\mbox{]}@{operator[]}}
\index{operator\mbox{[}$\,$\mbox{]}@{operator[]}!Tuple@{Tuple}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple\+Item} \& Tuple\+::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{int}]{idx}
\end{DoxyParamCaption}
)}}\label{class_tuple_abfc4807b189b92b160d4bc7cb65da983}


\mbox{[}\mbox{]}运算符重载 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组元素 
\end{DoxyReturn}
\hypertarget{class_tuple_a14e6fdcdb7d56cc12ef9347bb0290583}{\index{Tuple@{Tuple}!serialize@{serialize}}
\index{serialize@{serialize}!Tuple@{Tuple}}
\subsubsection[{serialize}]{\setlength{\rightskip}{0pt plus 5cm}string Tuple\+::serialize (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_a14e6fdcdb7d56cc12ef9347bb0290583}


序列化元组 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
序列化字符串 
\end{DoxyReturn}


实现了 \hyperlink{class_array}{Array}.

\hypertarget{class_tuple_af2101a7325c6a4738ad1bc7de5fea20d}{\index{Tuple@{Tuple}!size@{size}}
\index{size@{size}!Tuple@{Tuple}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}int Tuple\+::size (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_af2101a7325c6a4738ad1bc7de5fea20d}


获取元组大小 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
元组所包含的元素的个数 
\end{DoxyReturn}


实现了 \hyperlink{class_array}{Array}.

\hypertarget{class_tuple_ab37a8148901bf4ee55ab9b793f813710}{\index{Tuple@{Tuple}!type@{type}}
\index{type@{type}!Tuple@{Tuple}}
\subsubsection[{type}]{\setlength{\rightskip}{0pt plus 5cm}int Tuple\+::type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_tuple_ab37a8148901bf4ee55ab9b793f813710}


获取类型 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
B\+A\+S\+E\+T\+Y\+P\+E\+\_\+\+T\+U\+P\+L\+E 
\end{DoxyReturn}


实现了 \hyperlink{class_array}{Array}.



\subsection{友元及相关函数文档}
\hypertarget{class_tuple_aa3ddc8f2d4e5773a63eecdf6ae257b4f}{\index{Tuple@{Tuple}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Tuple@{Tuple}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple}\& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{{\bf Tuple} \&}]{tuple, }
\item[{int}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_tuple_aa3ddc8f2d4e5773a63eecdf6ae257b4f}


$<$$<$运算符重载,实现给元组添加int型元素 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组 
\end{DoxyReturn}
\hypertarget{class_tuple_ad429aaaed31119892dd975a79b1bd231}{\index{Tuple@{Tuple}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Tuple@{Tuple}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple}\& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{{\bf Tuple} \&}]{tuple, }
\item[{double}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_tuple_ad429aaaed31119892dd975a79b1bd231}


$<$$<$运算符重载,实现给元组添加double型元素 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组 
\end{DoxyReturn}
\hypertarget{class_tuple_a532ca9ed8eece8b3d8c4b364dc34fe2a}{\index{Tuple@{Tuple}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Tuple@{Tuple}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple}\& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{{\bf Tuple} \&}]{tuple, }
\item[{const char $\ast$}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_tuple_a532ca9ed8eece8b3d8c4b364dc34fe2a}


$<$$<$运算符重载,实现给元组添加char$\ast$型元素 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组 
\end{DoxyReturn}
\hypertarget{class_tuple_a0c80f310eb6838160240a22087f5f77e}{\index{Tuple@{Tuple}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Tuple@{Tuple}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Tuple}\& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{{\bf Tuple} \&}]{tuple, }
\item[{{\bf Tuple\+Item} \&}]{value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_tuple_a0c80f310eb6838160240a22087f5f77e}


$<$$<$运算符重载,实现给元组添加元组元素 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回元组 
\end{DoxyReturn}
\hypertarget{class_tuple_a82ca6c23e65415240b396586fbc86160}{\index{Tuple@{Tuple}!operator$<$$<$@{operator$<$$<$}}
\index{operator$<$$<$@{operator$<$$<$}!Tuple@{Tuple}}
\subsubsection[{operator$<$$<$}]{\setlength{\rightskip}{0pt plus 5cm}ostream\& operator$<$$<$ (
\begin{DoxyParamCaption}
\item[{ostream \&}]{out, }
\item[{{\bf Tuple} \&}]{tuple}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [friend]}}}\label{class_tuple_a82ca6c23e65415240b396586fbc86160}


$<$$<$运算符重载,实现输出元组 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
返回输出流 
\end{DoxyReturn}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_tuple_8h}{Tuple.\+h}\item 
libemb/src/Tuple.\+cpp\end{DoxyCompactItemize}
